package com.ayoka.parenting.adapter;

import android.widget.ImageView;
import android.widget.TextView;

import com.ayoka.parenting.R;
import com.ayoka.parenting.bean.BasicUserInfoBean;
import com.jincp.common.brvah.BaseQuickAdapter;
import com.jincp.common.brvah.BaseViewHolder;
import com.jincp.common.utils.StringUtil;
import com.jincp.image.load.ImageLoader;
import com.jincp.image.load.ImageLoaderOptions;


/**
 * @ProjectName: ayoka7.
 * @ClassName: CourseClassroomMemberAdapter.
 * @Description: .
 * @Author: jincp.
 * @CreateDate: 2019/8/6 21:15.
 */

public class InvitedRecordAdapter extends BaseQuickAdapter<BasicUserInfoBean, BaseViewHolder> {

    public InvitedRecordAdapter() {
        super(R.layout.item_invited_record);
    }

    @Override
    protected void convert(BaseViewHolder holder, BasicUserInfoBean item) {
        ImageLoader.getInstance().displayImage(item.LocalAvatar, (ImageView) holder.getView(R.id.iv_user_header), ImageLoaderOptions.getCircleOptions());
        holder.setText(R.id.tv_user_name, item.WeixinNickName)
            .setText(R.id.tv_user_name, StringUtil.formatString(R.string.format_join_date, item.CreateDate));
    }
}
